package P015_RememberBreak;

import org.junit.Test;

/**
 * Desc:&emsp;&ensp; 使用序列化类的私有方法巧妙解决部分属性持久化问题
 *
 * @author 李渊&emsp;liyuan7@yusys.com.cn
 * @version 1.0
 * @since V4.3&emsp;2022/2/24
 */
public class RememberBreak {
    @Test
    public void TestSwitch() {
        System.out.println("2 = " + toChineseNumberCase(2));
    }
    //把阿拉伯数字鉬译成中文大写数字
    public static String toChineseNumberCase(int n) {
            String chineseNumber = null;
            switch (n) {
                case 0:
                    chineseNumber = "零";
                case 1:
                    chineseNumber = "壹";
                case 2:
                    chineseNumber = "贰";
                case 3:
                    chineseNumber = "叁";
                case 4:
                    chineseNumber = "肆";
                case 5:
                    chineseNumber = "伍";
                case 6:
                    chineseNumber = "陆";
                case 7:
                    chineseNumber = "柒";
                case 8:
                    chineseNumber = "捌";
                case 9:
                    chineseNumber = "玖";
            }
            return chineseNumber;
        }

}


